package com.luyu.util;

import cn.hutool.core.collection.CollUtil;

import java.util.List;

public class SqlPelUtil {

    public static String listIdsSql(String fieldStr,List<Long> list){
        String str="";
        if (CollUtil.isEmpty(list)) {
            return str;
        }
        for (Long t : list) {
            str+=str+t.toString()+", ";
        }
        str=" "+ fieldStr+ "in ("+str.substring(0, str.length() - 1)+")";
        return str;
    }
}
